package impl;

import anaydis.sort.SorterType;

import java.util.Comparator;
import java.util.List;

public class ShellSorter extends HSorter  {

    private static final int [] secuencia = {1,8,23,77,281,1073,4193};
    private static final int [] secuencia2 = {1,4,13,40,121,364,1093};

    public ShellSorter() {
         super(SorterType.SHELL);
    }

     public <T> void sort(Comparator<T> comparator, List<T> list) {

         sort(comparator,list,secuencia2);

     }public <T> void sort(Comparator<T> comparator, List<T> list,int []secuencia) {
         int n = secuencia.length;
         for(int i = n-1 ; i>=0;i-- ){
             sort(comparator,list,secuencia[i]);
         }
     }




}